use "Barber_Bolton_Thrower_Replication_Data_LSQ.dta", clear

**************************
**Supplemental Materials**
**************************

*Run Model 1 of Table 2 to get observations included in the analysis
nbreg num_eos i.state_fe i.year divided_gov1 veto_proof house_polarization rule_review_scale governor_power governor_party_pres_vote ///
 governor_prior_vote gov_republican governor_election_year term_limited ln_legislative_staff ln_legislative_salary ln_state_income_growth ///
 if (gov_republican == 1 | gov_democrat == 1), cluster(govfe)
gen inmodel = e(sample) == 1

egen total = sum(num_total_eo) if inmodel == 1
egen nc = sum(num_ceremonial_eo) if inmodel == 1
egen dis = sum(num_disaster_eo) if inmodel == 1
egen par = sum(num_pardon_eo) if inmodel == 1
egen rou = sum(num_routine_eo) if inmodel == 1
egen norou = sum(num_nonroutine_eo) if inmodel == 1
egen dvtot = sum(num_eos) if inmodel == 1

******************************
*Table A1 - summary statistics
******************************

bys state: sum num_total_eo if inmodel == 1
bys state: sum num_nonceremonial_eo if inmodel == 1
bys state: sum num_eos if inmodel == 1
bys state: sum year if inmodel == 1

***********************************
*summary of control variables table
***********************************

*Table A2
bys state: sum permanent_staff annual_salary2015 governor_power if inmodel == 1

*Table A3
xtset state_fe
xtsum divided_gov1 rule_review_dichotomous rule_review_scale veto_proof house_polarization governor_power governor_party_pres_vote ///
 governor_prior_vote gov_republican governor_election_year term_limited ln_legislative_staff ln_legislative_salary ln_state_income_growth if inmodel == 1

*Table A4
tab divided_gov1 veto_proof if inmodel == 1
tab divided_gov1 rule_review_scale if inmodel == 1
tab divided_gov1 rule_review_dichotomous if inmodel == 1

*Table A5 - Exclude Ceremonial and Pardon EOs
nbreg num_nonceremonial_eo i.state_fe i.year i.divided_gov1##i.veto_proof house_polarization rule_review_scale governor_power governor_party_pres_vote governor_prior_vote gov_republican governor_election_year term_limited ln_legislative_staff ln_legislative_salary ln_state_income_growth  if (gov_republican == 1 | gov_democrat == 1), cluster(govfe)
nbreg num_nonceremonial_eo i.state_fe i.year i.divided_gov1##c.house_polarization veto_proof rule_review_scale governor_power governor_party_pres_vote governor_prior_vote gov_republican governor_election_year term_limited ln_legislative_staff ln_legislative_salary ln_state_income_growth  if (gov_republican == 1 | gov_democrat == 1), cluster(govfe)
nbreg num_nonceremonial_eo i.state_fe i.year i.divided_gov1##c.rule_review_scale veto_proof house_polarization governor_power governor_party_pres_vote governor_prior_vote gov_republican governor_election_year term_limited ln_legislative_staff ln_legislative_salary ln_state_income_growth  if (gov_republican == 1 | gov_democrat == 1), cluster(govfe)

*Table A6 - Exclude Disaster EOs
gen nodisaster = num_eos - numdisasterdeclare
nbreg nodisaster i.state_fe i.year i.divided_gov1##i.veto_proof house_polarization rule_review_scale governor_power governor_party_pres_vote governor_prior_vote gov_republican governor_election_year term_limited ln_legislative_staff ln_legislative_salary ln_state_income_growth  if (gov_republican == 1 | gov_democrat == 1), cluster(govfe)
nbreg nodisaster i.state_fe i.year i.divided_gov1##c.house_polarization veto_proof rule_review_scale governor_power governor_party_pres_vote governor_prior_vote gov_republican governor_election_year term_limited ln_legislative_staff ln_legislative_salary ln_state_income_growth  if (gov_republican == 1 | gov_democrat == 1), cluster(govfe)
nbreg nodisaster i.state_fe i.year i.divided_gov1##c.rule_review_scale veto_proof house_polarization governor_power governor_party_pres_vote governor_prior_vote gov_republican governor_election_year term_limited ln_legislative_staff ln_legislative_salary ln_state_income_growth  if (gov_republican == 1 | gov_democrat == 1), cluster(govfe)

*Table A7 - Include All EOs
nbreg num_total_eo i.state_fe i.year i.divided_gov1##i.veto_proof house_polarization rule_review_scale governor_power governor_party_pres_vote governor_prior_vote gov_republican governor_election_year term_limited ln_legislative_staff ln_legislative_salary ln_state_income_growth  if (gov_republican == 1 | gov_democrat == 1), cluster(govfe)
nbreg num_total_eo i.state_fe i.year i.divided_gov1##c.house_polarization veto_proof rule_review_scale governor_power governor_party_pres_vote governor_prior_vote gov_republican governor_election_year term_limited ln_legislative_staff ln_legislative_salary ln_state_income_growth  if (gov_republican == 1 | gov_democrat == 1), cluster(govfe)
nbreg num_total_eo i.state_fe i.year i.divided_gov1##c.rule_review_scale veto_proof house_polarization governor_power governor_party_pres_vote governor_prior_vote gov_republican governor_election_year term_limited ln_legislative_staff ln_legislative_salary ln_state_income_growth  if (gov_republican == 1 | gov_democrat == 1), cluster(govfe)

*Table A8 - Governor Fixed Effects
set matsize 1000
encode govfe, gen(gov_fe)
nbreg num_eos i.gov_fe i.year i.divided_gov1##i.veto_proof house_polarization rule_review_scale governor_power governor_party_pres_vote governor_prior_vote gov_republican governor_election_year term_limited ln_legislative_staff ln_legislative_salary ln_state_income_growth  if (gov_republican == 1 | gov_democrat == 1), cluster(govfe)
nbreg num_eos i.gov_fe i.year i.divided_gov1##c.house_polarization veto_proof rule_review_scale governor_power governor_party_pres_vote governor_prior_vote gov_republican governor_election_year term_limited ln_legislative_staff ln_legislative_salary ln_state_income_growth  if (gov_republican == 1 | gov_democrat == 1), cluster(govfe)
nbreg num_eos i.gov_fe i.year i.divided_gov1##c.rule_review_scale veto_proof house_polarization governor_power governor_party_pres_vote governor_prior_vote gov_republican governor_election_year term_limited ln_legislative_staff ln_legislative_salary ln_state_income_growth  if (gov_republican == 1 | gov_democrat == 1), cluster(govfe)

*Table A9 - Exclude Particular States
nbreg num_eos i.state_fe i.year i.divided_gov1##i.veto_proof house_polarization rule_review_scale governor_power governor_party_pres_vote governor_prior_vote gov_republican governor_election_year term_limited ln_legislative_staff ln_legislative_salary ln_state_income_growth  if (gov_republican == 1 | gov_democrat == 1) & st != "KY" & st != "GA" & st != "FL" & st != "TX" & st != "PA", cluster(govfe)
nbreg num_eos i.state_fe i.year i.divided_gov1##c.house_polarization veto_proof rule_review_scale governor_power governor_party_pres_vote governor_prior_vote gov_republican governor_election_year term_limited ln_legislative_staff ln_legislative_salary ln_state_income_growth  if (gov_republican == 1 | gov_democrat == 1) & st != "KY" & st != "GA" & st != "FL" & st != "TX" & st != "PA", cluster(govfe)
nbreg num_eos i.state_fe i.year i.divided_gov1##c.rule_review_scale veto_proof house_polarization governor_power governor_party_pres_vote governor_prior_vote gov_republican governor_election_year term_limited ln_legislative_staff ln_legislative_salary ln_state_income_growth  if (gov_republican == 1 | gov_democrat == 1) & st != "KY" & st != "GA" & st != "FL" & st != "TX" & st != "PA", cluster(govfe)

*Table A10 - Remove 1993 b/c of Governor Power Variable
nbreg num_eos i.state_fe i.year i.divided_gov1##i.veto_proof house_polarization rule_review_scale governor_power governor_party_pres_vote governor_prior_vote gov_republican governor_election_year term_limited ln_legislative_staff ln_legislative_salary ln_state_income_growth  if (gov_republican == 1 | gov_democrat == 1) & year > 1993, cluster(govfe)
nbreg num_eos i.state_fe i.year i.divided_gov1##c.house_polarization veto_proof rule_review_scale governor_power governor_party_pres_vote governor_prior_vote gov_republican governor_election_year term_limited ln_legislative_staff ln_legislative_salary ln_state_income_growth  if (gov_republican == 1 | gov_democrat == 1) & year > 1993, cluster(govfe)
nbreg num_eos i.state_fe i.year i.divided_gov1##c.rule_review_scale veto_proof house_polarization governor_power governor_party_pres_vote governor_prior_vote gov_republican governor_election_year term_limited ln_legislative_staff ln_legislative_salary ln_state_income_growth  if (gov_republican == 1 | gov_democrat == 1) & year > 1993, cluster(govfe)

*Table A11 - Different Measures of Polarization
nbreg num_eos i.state_fe i.year i.divided_gov1##c.senate_polarization veto_proof rule_review_scale governor_power governor_party_pres_vote governor_prior_vote gov_republican governor_election_year term_limited ln_legislative_staff ln_legislative_salary ln_state_income_growth  if (gov_republican == 1 | gov_democrat == 1) & year > 2003, cluster(govfe)
nbreg num_eos i.state_fe i.year i.divided_gov1##c.average_polarization veto_proof rule_review_scale governor_power governor_party_pres_vote governor_prior_vote gov_republican governor_election_year term_limited ln_legislative_staff ln_legislative_salary ln_state_income_growth  if (gov_republican == 1 | gov_democrat == 1) & year > 2003, cluster(govfe)
nbreg num_eos i.state_fe i.year i.divided_gov1##c.house_polarization_stdev veto_proof rule_review_scale governor_power governor_party_pres_vote governor_prior_vote gov_republican governor_election_year term_limited ln_legislative_staff ln_legislative_salary ln_state_income_growth  if (gov_republican == 1 | gov_democrat == 1) & year > 2003, cluster(govfe)
nbreg num_eos i.state_fe i.year i.divided_gov1##c.house_polarization_bonica veto_proof rule_review_scale governor_power governor_party_pres_vote governor_prior_vote gov_republican governor_election_year term_limited ln_legislative_staff ln_legislative_salary ln_state_income_growth  if (gov_republican == 1 | gov_democrat == 1) & year > 2003, cluster(govfe)
nbreg num_eos i.state_fe i.year i.divided_gov1##c.senate_polarization_bonica veto_proof rule_review_scale governor_power governor_party_pres_vote governor_prior_vote gov_republican governor_election_year term_limited ln_legislative_staff ln_legislative_salary ln_state_income_growth  if (gov_republican == 1 | gov_democrat == 1) & year > 2003, cluster(govfe)
nbreg num_eos i.state_fe i.year i.divided_gov1##c.house_polarization_maj_pty_het veto_proof rule_review_scale governor_power governor_party_pres_vote governor_prior_vote gov_republican governor_election_year term_limited ln_legislative_staff ln_legislative_salary ln_state_income_growth  if (gov_republican == 1 | gov_democrat == 1) & year > 2003, cluster(govfe)

*Table A12 - Include 3rd Party Governors
nbreg num_eos i.state_fe i.year i.divided_gov1##i.veto_proof house_polarization rule_review_scale governor_power governor_party_pres_vote governor_prior_vote gov_republican governor_election_year term_limited ln_legislative_staff ln_legislative_salary ln_state_income_growth, cluster(govfe)
nbreg num_eos i.state_fe i.year i.divided_gov1##c.house_polarization veto_proof rule_review_scale governor_power governor_party_pres_vote governor_prior_vote gov_republican governor_election_year term_limited ln_legislative_staff ln_legislative_salary ln_state_income_growth, cluster(govfe)
nbreg num_eos i.state_fe i.year i.divided_gov1##c.rule_review_scale veto_proof house_polarization governor_power governor_party_pres_vote governor_prior_vote gov_republican governor_election_year term_limited ln_legislative_staff ln_legislative_salary ln_state_income_growth, cluster(govfe)

*Table A13 - Include Only Long Panels
nbreg num_eos i.state_fe i.year i.divided_gov1##i.veto_proof house_polarization rule_review_scale governor_power governor_party_pres_vote governor_prior_vote gov_republican governor_election_year term_limited ln_legislative_staff ln_legislative_salary ln_state_income_growth  if (gov_republican == 1 | gov_democrat == 1) & panel_length >= 10, cluster(govfe)
nbreg num_eos i.state_fe i.year i.divided_gov1##c.house_polarization veto_proof rule_review_scale governor_power governor_party_pres_vote governor_prior_vote gov_republican governor_election_year term_limited ln_legislative_staff ln_legislative_salary ln_state_income_growth  if (gov_republican == 1 | gov_democrat == 1) & panel_length >= 10, cluster(govfe)
nbreg num_eos i.state_fe i.year i.divided_gov1##c.rule_review_scale veto_proof house_polarization governor_power governor_party_pres_vote governor_prior_vote gov_republican governor_election_year term_limited ln_legislative_staff ln_legislative_salary ln_state_income_growth  if (gov_republican == 1 | gov_democrat == 1) & panel_length >= 10, cluster(govfe)

*Table A14 - Balanced Panel
nbreg num_eos i.state_fe i.year i.divided_gov1##i.veto_proof house_polarization_impute rule_review_scale governor_power governor_party_pres_vote governor_prior_vote gov_republican governor_election_year term_limited ln_legislative_staff ln_legislative_salary ln_state_income_growth if st!="AR" & st!="GA" & st!="KY"& st!="ME"& st!="MO"& st!="NV"& st!="NM"& st!="NY"& st!="ND"& st!="OH"& st!="WY" & year >= 2000 & year <= 2013, cluster(govfe)
nbreg num_eos i.state_fe i.year i.divided_gov1##c.house_polarization_impute veto_proof rule_review_scale governor_power governor_party_pres_vote governor_prior_vote gov_republican governor_election_year term_limited ln_legislative_staff ln_legislative_salary ln_state_income_growth if st!="AR" & st!="GA" & st!="KY"& st!="ME"& st!="MO"& st!="NV"& st!="NM"& st!="NY"& st!="ND"& st!="OH"& st!="WY" & year >= 2000 & year <= 2013, cluster(govfe)
nbreg num_eos i.state_fe i.year i.divided_gov1##c.rule_review_scale veto_proof house_polarization_impute governor_power governor_party_pres_vote governor_prior_vote gov_republican governor_election_year term_limited ln_legislative_staff ln_legislative_salary ln_state_income_growth if st!="AR" & st!="GA" & st!="KY"& st!="ME"& st!="MO"& st!="NV"& st!="NM"& st!="NY"& st!="ND"& st!="OH"& st!="WY" & year >= 2000 & year <= 2013, cluster(govfe)

*Table A15 - Additional Controls
sort state year
bys state: gen lag1 = num_eos[_n-1]

nbreg num_eos i.state_fe i.year lag1 i.divided_gov1##i.veto_proof house_polarization rule_review_scale governor_power governor_party_pres_vote governor_prior_vote gov_republican governor_election_year term_limited ln_legislative_staff ln_legislative_salary ln_state_income_growth ln_state_expenditures gov_time_in_office gov_party_size if (gov_republican == 1 | gov_democrat == 1), cluster(govfe)
nbreg num_eos i.state_fe i.year lag1 i.divided_gov1##c.house_polarization veto_proof rule_review_scale governor_power governor_party_pres_vote governor_prior_vote gov_republican governor_election_year term_limited ln_legislative_staff ln_legislative_salary ln_state_income_growth ln_state_expenditures gov_time_in_office gov_party_size if (gov_republican == 1 | gov_democrat == 1), cluster(govfe)
nbreg num_eos i.state_fe i.year lag1 i.divided_gov1##c.rule_review_scale veto_proof house_polarization governor_power governor_party_pres_vote governor_prior_vote gov_republican governor_election_year term_limited ln_legislative_staff ln_legislative_salary ln_state_income_growth ln_state_expenditures gov_time_in_office gov_party_size if (gov_republican == 1 | gov_democrat == 1), cluster(govfe)

*Table A16 - Ln(DV) OLS Models
gen log_dv = ln(num_eos + 1)
reg log_dv i.state_fe i.year i.divided_gov1##i.veto_proof house_polarization rule_review_scale governor_power governor_party_pres_vote governor_prior_vote gov_republican governor_election_year term_limited ln_legislative_staff ln_legislative_salary ln_state_income_growth  if (gov_republican == 1 | gov_democrat == 1), cluster(govfe)
reg log_dv i.state_fe i.year i.divided_gov1##c.house_polarization veto_proof rule_review_scale governor_power governor_party_pres_vote governor_prior_vote gov_republican governor_election_year term_limited ln_legislative_staff ln_legislative_salary ln_state_income_growth  if (gov_republican == 1 | gov_democrat == 1), cluster(govfe)
reg log_dv i.state_fe i.year i.divided_gov1##c.rule_review_scale veto_proof house_polarization governor_power governor_party_pres_vote governor_prior_vote gov_republican governor_election_year term_limited ln_legislative_staff ln_legislative_salary ln_state_income_growth  if (gov_republican == 1 | gov_democrat == 1), cluster(govfe)

*Table A17 - Different Divided Government Definition
nbreg num_eos i.state_fe i.year i.divided_gov2##i.veto_proof house_polarization rule_review_scale governor_power governor_party_pres_vote governor_prior_vote gov_republican governor_election_year term_limited ln_legislative_staff ln_legislative_salary ln_state_income_growth  if (gov_republican == 1 | gov_democrat == 1), cluster(govfe)
nbreg num_eos i.state_fe i.year i.divided_gov2##c.house_polarization veto_proof rule_review_scale governor_power governor_party_pres_vote governor_prior_vote gov_republican governor_election_year term_limited ln_legislative_staff ln_legislative_salary ln_state_income_growth  if (gov_republican == 1 | gov_democrat == 1), cluster(govfe)
nbreg num_eos i.state_fe i.year i.divided_gov2##c.rule_review_scale veto_proof house_polarization governor_power governor_party_pres_vote governor_prior_vote gov_republican governor_election_year term_limited ln_legislative_staff ln_legislative_salary ln_state_income_growth  if (gov_republican == 1 | gov_democrat == 1), cluster(govfe)

*Table A18 - Correlated Random Effects Model
bys state: egen mean_dividedgov = mean(divided_gov1)
bys state: egen mean_vetoproof = mean(veto_proof)
bys state: egen mean_hdiffs = mean(house_polarization)
bys state: egen mean_govstrength = mean(governor_party_pres_vote)
bys state: egen mean_prevgovelect = mean(governor_prior_vote)
bys state: egen mean_republican = mean(gov_republican)
bys state: egen mean_election = mean(governor_election_year)
bys state: egen mean_termlimit = mean(term_limited)
bys state: egen mean_staff = mean(ln_legislative_staff)
bys state: egen mean_salary = mean(ln_legislative_salary)
bys state: egen mean_income = mean(ln_state_income_growth)
bys state: egen mean_scopereview = mean(rule_review_scale)
bys state: egen mean_gip = mean(governor_power)

gen int1 = divided_gov1*veto_proof
gen int2 = divided_gov1*house_polarization
gen int3 = divided_gov1*rule_review_scale
bys state: egen mean_int1 = mean(int1)
bys state: egen mean_int2 = mean(int2)
bys state: egen mean_int3 = mean(int3)
bys state: egen mean_mci = mean(maj_control_index)

menbreg num_eos maj_control_index divided_gov1 veto_proof int1 house_polarization rule_review_scale governor_power ///
governor_party_pres_vote governor_prior_vote gov_republican governor_election_year term_limited ln_legislative_staff ///
ln_legislative_salary ln_state_income_growth ///
mean_dividedgov mean_vetoproof mean_int1 mean_hdiffs mean_scopereview mean_govstrength mean_prevgovelect mean_republican ///
mean_election mean_termlimit mean_staff mean_salary mean_income if (gov_republican == 1 | gov_democrat == 1) ///
|| state_fe: || year:

menbreg nbreg num_eos maj_control_index divided_gov1 house_polarization int2 veto_proof rule_review_scale governor_power ///
governor_party_pres_vote governor_prior_vote gov_republican governor_election_year term_limited ln_legislative_staff ///
ln_legislative_salary ln_state_income_growth ///
mean_dividedgov mean_hdiffs mean_int2 mean_vetoproof mean_scopereview mean_govstrength mean_prevgovelect mean_republican ///
mean_election mean_termlimit mean_staff mean_salary mean_income if (gov_republican == 1 | gov_democrat == 1) ///
|| state_encode: || year:

menbreg nbreg num_eos maj_control_index divided_gov1 rule_review_scale int3 veto_proof house_polarization governor_power ///
governor_party_pres_vote governor_prior_vote gov_republican governor_election_year term_limited ln_legislative_staff ///
ln_legislative_salary ln_state_income_growth ///
mean_dividedgov mean_scopereview mean_int3 mean_vetoproof mean_hdiffs mean_govstrength mean_prevgovelect mean_republican ///
mean_election mean_termlimit mean_staff mean_salary mean_income if (gov_republican == 1 | gov_democrat == 1) ///
|| state_encode: || year:

*Table A19 - Alternative Scenarios
egen minhdiff = min(house_polarization), by(state_fe)
egen maxhdiff = max(house_polarization), by(state_fe)
egen meanhdiff = mean(house_polarization), by(state_fe)

gen allow = 0 
replace allow = 1 if rule_review_scale < 1.167854 & house_polarization > meanhdiff & veto_proof == 0
replace allow = . if rule_review_scale == . | house_polarization == . | veto_proof == .
nbreg num_eos i.state_fe i.year divided_gov1 house_polarization rule_review_scale governor_power governor_party_pres_vote governor_prior_vote gov_republican governor_election_year term_limited ln_legislative_staff ln_legislative_salary ln_state_income_growth  if (gov_republican == 1 | gov_democrat == 1) & allow == 1, cluster(govfe)

gen lowscopehighpolar = 0
replace lowscopehighpolar = 1 if rule_review_scale < 1.167854 & house_polarization > meanhdiff
replace lowscopehighpolar = . if rule_review_scale == . | house_polarization == .
nbreg num_eos i.state_fe i.year i.divided_gov1##c.veto_proof house_polarization rule_review_scale governor_power governor_party_pres_vote governor_prior_vote gov_republican governor_election_year term_limited ln_legislative_staff ln_legislative_salary ln_state_income_growth  if (gov_republican == 1 | gov_democrat == 1) & lowscopehighpolar == 1, cluster(govfe)

gen novetolowscope = 0
replace novetolowscope = 1 if veto_proof == 0 & rule_review_scale < 1.167854
replace novetolowscope = . if veto_proof == . | rule_review_scale == .
nbreg num_eos i.state_fe i.year i.divided_gov1##c.house_polarization rule_review_scale governor_power governor_party_pres_vote governor_prior_vote gov_republican governor_election_year term_limited ln_legislative_staff ln_legislative_salary ln_state_income_growth  if (gov_republican == 1 | gov_democrat == 1) & novetolowscope == 1, cluster(govfe)

gen novetohighpolar = 0
replace novetohighpolar = 1 if veto_proof == 0 & house_polarization > meanhdiff
replace novetohighpolar = . if veto_proof == . | house_polarization == .
nbreg num_eos i.state_fe i.year i.divided_gov1##c.rule_review_scale house_polarization governor_power governor_party_pres_vote governor_prior_vote gov_republican governor_election_year term_limited ln_legislative_staff ln_legislative_salary ln_state_income_growth  if (gov_republican == 1 | gov_democrat == 1) & novetohighpolar == 1, cluster(govfe)

nbreg num_eos i.state_fe i.year i.divided_gov1##i.veto_proof i.divided_gov1##c.house_polarization i.divided_gov1##c.rule_review_scale governor_power governor_party_pres_vote governor_prior_vote gov_republican governor_election_year term_limited ln_legislative_staff ln_legislative_salary ln_state_income_growth  if (gov_republican == 1 | gov_democrat == 1), cluster(govfe)
